<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://www.sinosoft.com.cn/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	
	<h:form> 
		<table> 
			 <tr>
				<td width="100%"   >
				  <p:toolbar>  
			        <p:toolbarGroup align="left"> 
			          <table>
			             <tr>
			               <td>
			               <p:graphicImage value="xxx/xxx"/>
			               </td>
			               <td> 
			                <p:commandButton type="push" value="Save" image="ui-icon-disk"/>  
			               </td>
			               <td>
			                <p:commandButton type="push" value="Delete" image="ui-icon-trash"/>  
			               </td>
			             </tr>
			          </table>
					</p:toolbarGroup>
				  </p:toolbar>
				</td>
				<td>
				  <p:toolbar>
					<p:toolbarGroup align="right">
						<table>
							<tr>
								<td><h:inputText value="请输入关键字" /></td>
								<td><h:inputText value="选择类型" /></td>
								<td>
								<p:commandButton type="push" value="search" image="ui-icon-trash"/>  
								</td>
							</tr>
						</table>
					</p:toolbarGroup>
				  </p:toolbar>
				</td>
			</tr> 
			<tr>
			  <td>
				  <p:commandButton type="push" value="发表新帖" image="ui-icon-trash"/>   
			  </td>
			  
			  <td align="right">
			     <p:commandLink style="margin-right:20px;">  
			        <h:outputText value="查看所有" />  
			     </p:commandLink>  
			     
			     <p:commandLink style="margin-right:20px;">  
			        <h:outputText value="查看精华帖" />  
			     </p:commandLink>
			  </td>
			</tr>
		</table>
		
		<h:panelGroup layout="block" styleClass="ui-layout-container sino-layout-container" style="position:relative;height:80%;overflow:hidden;margin:0px;padding:0px;border:medium none;">
		
			<h:panelGroup id="#{compId}_center" layout="block" styleClass="ui-widget ui-widget-content ui-corner-all ui-layout-pane ui-layout-pane-west" style="width:98%;height:85%;overflow:auto;">
				<p:dataTable id="#{compId}_searchform" var="patient" value="#{commonContentViewBean.lazyModel}" paginator="true"
					rows="#{commonContentViewBean.rowsNumber}" lazy="true" 
					emptyMessage="#{messages['portal.datatable.noRecordsFound']}"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			        rowsPerPageTemplate="#{commonContentViewBean.rowsNumberSelectItems}" 
			        selection="#{commonContentViewBean.selectedRow}" selectionMode="single" paginatorPosition="bottom"> 
			  
			  		<p:ajax event="rowSelect" oncomplete="console.log('id');"  />
			  
			        <c:forEach items="#{commonContentViewBean.header}" var="header" varStatus="stat">
			        	 
						<p:column style="width:#{header.width};" styleClass="#{header.alignStyle}">
							<f:facet name="header">
								<h:outputText value="#{header.label}" />
							</f:facet>
							<h:outputText value="#{patient.row[stat.index]}"/>
						</p:column>
							 
					</c:forEach>
					<p:column style="width:32px">  
					    <f:facet name="header">
							<h:outputText value="消息操作" />
						</f:facet>
			            <p:commandButton update="display" oncomplete="console.log('xxxxxxxxxx');"  
			            onstart="btnAction('#{commonContentViewBean.id}','v3.manage.role.roleLayout.add','1000','400','icons/cog_add.png','edit','msg-manage-scene','msg-lookup');"
			                    image="ui-icon ui-icon-search" actionListener="#{commonContentViewBean.search}" >    
			                   <h:inputHidden value="#{patient.row[0]}" />
			            </p:commandButton>  
			        </p:column> 
			    </p:dataTable>
			</h:panelGroup> 
			
		    <h:panelGroup id="#{compId}_bottom" class="ui-widget ui-widget-content ui-corner-all ui-layout-pane ui-layout-pane-south" style="padding:0px;overflow:auto;">
			    
			       <h:outputText value="今日：" /><h:outputText value="?" /><h:outputText value="帖" />
			       <h:outputText value="昨日：" /><h:outputText value="?" /><h:outputText value="帖" />
			       <h:outputText value="最高：" /><h:outputText value="?" /><h:outputText value="帖" /> 
			       <h:outputText value="主题：" /><h:outputText value="?" /><h:outputText value="帖" />
			       <h:outputText value="帖子：" /><h:outputText value="?" /><h:outputText value="帖" /> 
			       <h:outputText value="会员：" /><h:outputText value="?" /><h:outputText value="位" /> 
			       <h:outputText value="在线：" /><h:outputText value="?" /><h:outputText value="位" />
			    
		    </h:panelGroup>
	    </h:panelGroup>
		
	</h:form>

</ui:composition>
